package patterns.singleton.core;
/**
 * 单例模式的影子实例
 * 用于当当前对象不满足业务要求是修改单例对象
 * @author ran
 *
 */
public class ShadowSingleton {
	private static ShadowSingleton shadowSingleton;
	private ShadowSingleton(){
		
	}
	
	public static ShadowSingleton getInstance(){
		if (shadowSingleton==null) {
			shadowSingleton = new ShadowSingleton();			
		}
		return shadowSingleton;
	}
	
	public static void updateInstance(){
		shadowSingleton = new ShadowSingleton();
	}
}
